﻿using System.Collections.Generic;

namespace WeWork.Model
{
    /// <summary>
    /// 音频存档消息
    /// 注：如果音频过程中包括文档演示或屏幕共享，meeting_voice_call内会包含demofiledata数组跟sharescreendata数组，对应音频过程中的多次文档演示跟屏幕共享。
    /// </summary>
    public class ChatMeetingVoiceCall : MsgChatBase
    {
        /*
        {
            "msgid":"17952229780246929345_1594197637",
            "action":"send",
            "from":"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA",
            "tolist":["wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA"],
            "msgtime":1594197581203,
            "msgtype":"meeting_voice_call",
            "voiceid":"grb8a4c48a3c094a70982c518d55e40557",
            "meeting_voice_call":{
                "endtime":1594197635,
                "sdkfileid":"CpsBKjAqd0xhb2JWRUJldGtwcE5DVTB6UjRUalN6c09vTjVyRnF4YVJ5M24rZC9YcHF3cHRPVzRwUUlaMy9iTytFcnc0SlBkZDU1YjRNb0MzbTZtRnViOXV5WjUwZUIwKzhjbU9uRUlxZ3pyK2VXSVhUWVN2ejAyWFJaTldGSkRJVFl0aUhkcVdjbDJ1L2RPbjJsRlBOamJaVDNnPT0SOE5EZGZNVFk0T0RnMU16YzVNVGt5T1RJMk9GOHhNalk0TXpBeE9EZzJYekUxT1RReE9UYzJNemM9GiA3YTYyNzA3NTY4Nzc2MTY3NzQ2MTY0NzA2ZTc4NjQ2OQ==",
                "demofiledata":[
                    {"filename":"65eb1cdd3e7a3c1740ecd74220b6c627.docx","demooperator":"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA","starttime":1594197599,"endtime":1594197609}
                ],
                "sharescreendata":[
                    {"share":"wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA","starttime":1594197624,"endtime":1594197624}
                ]
            }
        }
        */
        /// <summary>
        /// String类型, 音频id
        /// </summary>
        public string voiceid { set; get; }
        /// <summary>
        /// 消息内容
        /// </summary>
        public MeetingVoiceCallInfo meeting_voice_call { set; get; }
    }

    public class MeetingVoiceCallInfo
    {
        /// <summary>
        /// 音频结束时间。uint32类型
        /// </summary>
        public long endtime { set; get; }
        /// <summary>
        /// sdkfileid。音频媒体下载的id。String类型
        /// </summary>
        public string sdkfileid { set; get; }
        /// <summary>
        /// 文档分享对象，Object类型
        /// </summary>
        public List<DemoFileData> demofiledata { set; get; }
        /// <summary>
        /// 屏幕共享对象，Object类型
        /// </summary>
        public List<ShareScreenData> sharescreendata { set; get; }
    }
    public class DemoFileData
    {
        /// <summary>
        /// 文档共享名称。String类型
        /// </summary>
        public string filename { set; get; }
        /// <summary>
        /// 文档共享操作用户的id。String类型
        /// </summary>
        public string demooperator { set; get; }
        /// <summary>
        /// 文档共享开始时间。Uint32类型
        /// </summary>
        public long starttime { set; get; }
        /// <summary>
        /// 文档共享结束时间。Uint32类型
        /// </summary>
        public long endtime { set; get; }
    }
    public class ShareScreenData
    {
        /// <summary>
        /// 屏幕共享用户的id。String类型
        /// </summary>
        public string share { set; get; }
        /// <summary>
        /// 屏幕共享开始时间。Uint32类型
        /// </summary>
        public long starttime { set; get; }
        /// <summary>
        /// 屏幕共享结束时间。Uint32类型
        /// </summary>
        public long endtime { set; get; }
    }
}
